package com.dgut.lab.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.*;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ToString
@Document(collection = "users")
@Builder
public class User {

    @Id
    @ExcelProperty(value = "学号",index = 0)
    private String username;
    @ExcelIgnore
    private String password;

    @ExcelProperty(value = "姓名",index = 1)
    private String name;
    @ExcelIgnore
    private String idNumber;
    @ExcelProperty(value = "手机号码",index = 2)
    private String phone;
    @ExcelIgnore
    private Date dateCreate;

    @ExcelIgnore
    private String school;
    @ExcelProperty(value = "学院",index = 3)
    private String department;
    @ExcelProperty(value = "年级",index = 4)
    private String grade;
    @ExcelProperty(value = "专业",index = 5)
    private String major;
    @ExcelProperty(value = "班级",index = 6)
    private Integer clazz;
    @ExcelIgnore
    private String role;

    @ExcelIgnore
    private Integer enabled;
    @ExcelIgnore
    private Integer accountNonExpired;
    @ExcelIgnore
    private Integer accountNonLocked;
    @ExcelIgnore
    private Integer credentialsNonExpired;
    @ExcelProperty(value = "最近提交时间",index = 7)
    private Date lastCommitTime;
//    @ExcelIgnore
//    private List<ObjectId> roleIds;
//    @ExcelIgnore
//    @Transient
//    private List<Role> roles;


}
